package com.bit.musicserver.controller;

import com.bit.musicserver.Service.UserService;
import com.bit.musicserver.Tools.ResponseBodyMessage;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {
   /* @Autowired
    private UserMapper userMapper;*/
    @Autowired
    private UserService userservice;
    @RequestMapping("/login")
    public ResponseBodyMessage loglin(@RequestParam("username") String username, @RequestParam("password") String password
            , HttpServletRequest request, HttpServletResponse response) {

        return userservice.loginservice(username,password,request,response);

    }

}


